<template>
  <div class="min-h-screen flex flex-col bg-gray-50 dark:bg-gray-900 transition-colors">
    <Header />

    <div class="flex flex-1">
      <Sidebar class="w-64 hidden md:block"></Sidebar>

      <main class="flex-1 p-4">
        <router-view />
      </main>
    </div>

    <Footer class="mt-auto" />
  </div>
</template>

<script setup lang="ts">

import Header from '@/components/Header.vue'
import Footer from '@/components/Footer.vue'
import Sidebar from '@/components/Sidebar.vue'
import { useThemeStore } from '@/store/theme'
import { watchEffect } from 'vue'


const themeStore = useThemeStore()

watchEffect(() => {
  document.documentElement.classList.toggle('dark', themeStore.isDark)
})
</script>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
